package com.lu.statistics.entity.front.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Pattern;

@Getter
@Setter
@ApiModel(value = "登录请求")
public class LoginRequest {

    @ApiModelProperty(value = "用户名", required = true, name = "userName", dataType = "string")
    @Pattern(regexp = "^[a-zA-Z0-9]{5,20}$", message = "username内容不正确")
    @Schema(description = "用户名")
    public String userName;

    @ApiModelProperty(value = "密码", required = true, name = "password", dataType = "string")
    @Pattern(regexp = "^[a-zA-Z0-9]{6,20}$", message = "password内容不正确")
    @Schema(description = "密码")
    public String password;

}
